﻿using System;

namespace Core.Framework
{
    /// <summary>
    /// 接口返回参数标准
    /// </summary>
    public class SocketResponse
    {
        /// <summary>
        /// 任务运行时间
        /// </summary>
        public double TaskRunTimeOfMilliseconds { get; set; }
        public object Body { get; set; }
        public CodeResult Code { get; set; } = CodeResult.SUCCESS;
        string _info { get; set; }
        public string Info
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_info))
                    return Code.GetRemarkOfInfo();
                return _info;
            }
            set { _info = value; }
        }
    }
}
